
import Vue from "vue";
import App from "./App";
import uploadFile from "./components/uploadFile.vue";
import tabBar from "./components/tabBar.vue";
// 全局mixins，用于实现setData等功能';
import Mixin from './polyfill/mixins';

Vue.mixin(Mixin);

Vue.config.productionTip = false
//引入vuex
import store from "./store";
//把vuex定义成全局组件
Vue.prototype.$store = store;
const app = new Vue({
    ...App
})
Vue.component("tab-bar", tabBar);
Vue.component("upload-file", uploadFile);
App.mpType = 'app'


app.$mount();


// main.js
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from "@/common/http.interceptor.js";
Vue.use(httpInterceptor, app);

// http接口API抽离，免于写url或者一些固定的参数
import httpApi from "@/common/http.api.js";
Vue.use(httpApi, app);